Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prevent passing in role claim in presigned URL JWTs #520

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

hf
Copy link
Contributor

@hf hf commented Jul 14, 2024

Just adds defense-in-depth that Storage can't be used as a signing oracle (an all-knowing entity you can tell to "sign" things for you) that would allow bypassing PostgREST RLS.

It achieves this by disallowing any role metadata to ever be supplied to the signObjectUrl method.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9929208009

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 79.609%

Totals Coverage Status
Change from base Build 9891441164: 0.005%
Covered Lines: 13176
Relevant Lines: 16400

💛 - Coveralls

Copy link

@staaldraad staaldraad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔒

@fenos fenos merged commit 9486b37 into master Jul 16, 2024
1 check passed
@fenos fenos deleted the hf/prevent-role-in-presigned-url branch July 16, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants